package com.qf.servlet;

import com.qf.Utils.DaoUtils;
import com.qf.entity.StudentClass;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@WebServlet(urlPatterns = "/queryStudentClass")
public class QueryStudentClassServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        List<StudentClass> studentClasses = DaoUtils.getStudentClasses();

        req.setAttribute("studentClassManager",studentClasses);
        req.getRequestDispatcher("studentClassManager.jsp").forward(req,resp);
    }




}
